Code Monkey home page Code Monkey logo

Comments (11)

DenBond7 avatar DenBond7 commented on July 24, 2024

I already have some results :)
2017-05-05_14-03-19

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

I have some questions:

  1. Can I detect if an email simple or encrypted?
  2. PgpKeyInfo. What is String longid? Where to take it?

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024
  1. Yes I wil give you a function that lets you detect it
  2. you can do k = js.crypto_key_read(....); and then k.getLongid(); - you should do this when saving the key

great work!

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

PgpKeyInfo. What is String longid? Where to take it?

I mean, when I create PgpKeyInfo pgpKeyInfo = new PgpKeyInfo(armoredKey, longid), where to take longid? I can generate longid random or I must take it from some code?

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

Longid is unique to each key and you have to get it from the key.

You have to get it when importing the key and save it along with the key. When you import, you are doing something like "key = js.crypto_key_read(....);". On that "key" variable you get, do key.getLongid() and save that along with the key.

Letter when JS is searching for that key, you can serve it based on the associated longid.

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

Sorry, I'm on my phone. Actually, you need to do "js.crypto_key_longid(key)" on that PgpKey variable during import.

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

That will give you longid. Save that when importing each key.

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

This one:

public String crypto_key_longid(PgpKey key)

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

9050cfe

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

Can I detect if an email simple or encrypted?

Later I will give you a sophisticated method that will parse out all details of an email and give it to you in an object. Some parts of email may be encrypted, some may be plain text, it may contain other elements like signatures or public keys and so on. We will look into that when we are done with the prototype.

For now, you can use js.crypto_armor_clip() for this. Supply it with text, and if the text contains an encrypted message, it will return you the string of the encrypted message - clipped so that you can put it into js.crypto_message_decrypt(). If there is no encrypted message in supplied text, it will return null.

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

750ad5d

from flowcrypt-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.