diff options
author | David Hook <dgh@bouncycastle.org> | 2019-01-15 11:01:18 +1100 |
---|---|---|
committer | David Hook <dgh@bouncycastle.org> | 2019-01-15 11:01:18 +1100 |
commit | f25f7bed6807096d9a67d31f547398c1f6f213e4 (patch) | |
tree | e05afc98f495985870a7b4edbf8ab45f63a75e68 /crypto/src/crmf/IEncryptedValuePadder.cs | |
parent | added alg constructor (diff) | |
download | BouncyCastle.NET-ed25519-f25f7bed6807096d9a67d31f547398c1f6f213e4.tar.xz |
first cut on Pkcs8
Diffstat (limited to 'crypto/src/crmf/IEncryptedValuePadder.cs')
-rw-r--r-- | crypto/src/crmf/IEncryptedValuePadder.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/crypto/src/crmf/IEncryptedValuePadder.cs b/crypto/src/crmf/IEncryptedValuePadder.cs new file mode 100644 index 000000000..b620186dc --- /dev/null +++ b/crypto/src/crmf/IEncryptedValuePadder.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Org.BouncyCastle.Crmf +{ + /** + * An encrypted value padder is used to make sure that prior to a value been + * encrypted the data is padded to a standard length. + */ + public interface EncryptedValuePadder + { + /** + * Return a byte array of padded data. + * + * @param data the data to be padded. + * @return a padded byte array containing data. + */ + byte[] GetPaddedData(byte[] data); + + /** + * Return a byte array of with padding removed. + * + * @param paddedData the data to be padded. + * @return an array containing the original unpadded data. + */ + byte[] GetUnpaddedData(byte[] paddedData); + } +} |