mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-11-24 14:35:51 +00:00
14 lines
327 B
JavaScript
14 lines
327 B
JavaScript
import * as cipher from '.';
|
|
import enums from '../../enums';
|
|
|
|
/**
|
|
* Get implementation of the given cipher
|
|
* @param {enums.symmetric} algo
|
|
* @returns {Object}
|
|
* @throws {Error} on invalid algo
|
|
*/
|
|
export default function getCipher(algo) {
|
|
const algoName = enums.read(enums.symmetric, algo);
|
|
return cipher[algoName];
|
|
}
|