mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add type information for cryptex module * update tests * Add test file to 'files' * fix definitions for cryptex * create additional tests
17 lines
415 B
TypeScript
17 lines
415 B
TypeScript
import * as cryptex from "cryptex";
|
|
|
|
cryptex.update({
|
|
config: {
|
|
keySource: "none",
|
|
algorithm: "plaintext",
|
|
secretEncoding: "binary",
|
|
secrets: {
|
|
foo: "bar"
|
|
}
|
|
}
|
|
});
|
|
|
|
const value: Promise<string> = cryptex.getSecret("foo", true);
|
|
const decryptedValue: Promise<string> = cryptex.decrypt("foo");
|
|
const encryptedValue: Promise<string> = cryptex.encrypt("bar");
|