Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"id-aes128-wrap" cipher method fails #1

Open
impro-vi opened this issue Nov 14, 2021 · 0 comments
Open

"id-aes128-wrap" cipher method fails #1

impro-vi opened this issue Nov 14, 2021 · 0 comments

Comments

@impro-vi
Copy link

impro-vi commented Nov 14, 2021

Same for these cipher methods too:

    'id-aes128-wrap' => 'id-aes128-wrap',
    'id-aes128-wrap-pad' => 'id-aes128-wrap-pad',
    'id-aes192-wrap' => 'id-aes192-wrap',
    'id-aes192-wrap-pad' => 'id-aes192-wrap-pad',
    'id-aes256-wrap' => 'id-aes256-wrap',
    'id-aes256-wrap-pad' => 'id-aes256-wrap-pad',
    'id-smime-alg-CMS3DESwrap' => 'id-smime-alg-CMS3DESwrap',

Code sample:

//get all Algorithm
$list = Cryptographers::getCipherMethods();

Cryptographers::setChipper('id-aes128-wrap');

//Encode:
$encoded = Cryptographers::encrypt("Hello World");

//Decode:
$decoded = Cryptographers::decrypt($encoded);

echo $encoded.PHP_EOL;
echo $decoded.PHP_EOL;

//Output:
//bMhFJ86i3GckUaoq.FTAdoRaUOrs79Rs=
//Hello World

//Get Random Salt
Cryptographers::getRandomByte();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant