Mask and UnMask the Password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kumaresan
    Junior Member
    • Aug 2018
    • 19

    Mask and UnMask the Password

    this Idea is to MASK a Passphrase Filed and encode / Decode a password

    a. User enters a PassPhrase

    b. I use Formula to Convert the "Passphrase" into a Masked Random Charter and Update in filed "maskedPassphrase"

    achieved using this:
    maskedPassphrase=string\upperCase(
    string\concatenate(
    string\substring(passphrase, 0, number\randomInt(1, 3)),
    string\substring("##########", -3, number\randomInt(2, 10)),
    string\substring(passphrase, -3, number\randomInt(2, 4)),
    string\substring(password\generate(), -3, number\randomInt(2, 6)),"X",
    string\substring("##########", -3, number\randomInt(2, 10))));

    c. Convert the Passphrase to a Encoded String and Store ina Field "EncodedPassword "

    Tried using this:
    $EncodedPassword=password\hash(passphrase);

    d. When ever requried, I want to Decode the Field "EncodedPassword " back to Filed "Passphrase"

    Tried using this:
    util\base64Decode($EncodedPassword));

    got ERROR :


    Function util\base64Encode; Bad argument type on position 1, must be string.​

    Request you to guide me to achieve
    a. Mask a Passphrase
    b. Encrypt a Password
    c. Decrypt when requried
  • emillod
    Active Community Member
    • Apr 2017
    • 1439

    #2
    You'll not be able to do that. Formulas are not for this.
    You can have password field which will not be visible to a user and you'll be able to use it, for example in formulas, but there is no such feature like you want to encrypt/decrypt.

    It could be achieved by creating custom formula which would encrypt/decrypt based on secret in config file, but it's not available now. Base64 is not an encryption.

    Comment

    Working...