encode method

String encode()

Convert an EncryptionStrategy to a string so it can be used in Cryppo's serialization format

Implementation

String encode() {
  switch (this) {
    case EncryptionStrategy.aes256Gcm:
      return 'Aes256Gcm';
    case EncryptionStrategy.aes256Cbc:
      return 'Aes256Cbc';
    case EncryptionStrategy.aes256Ctr:
      return 'Aes256Ctr';
    case EncryptionStrategy.rsa4096:
      return 'Rsa4096';
  }
}