min-max
- C
- C++
- CSharp
- Java
- Swift
- Python
- Go
- PHP
// Get the minimum and maximum entropy byte length.
size_t min_entropy_bytes = mte_base_drbgs_entropy_min_bytes(MTE_DRBG_ENUM);
size_t max_entropy_bytes = mte_base_drbgs_entropy_max_bytes(MTE_DRBG_ENUM);
// Get min and max personalization string byte length.
size_t min_personal_bytes = mte_base_drbgs_personal_min_bytes(MTE_DRBG_ENUM);
size_t max_personal_bytes = mte_base_drbgs_personal_max_bytes(MTE_DRBG_ENUM);
// Get min and max nonce byte length.
size_t min_nonce_bytes = mte_base_drbgs_nonce_min_bytes(MTE_DRBG_ENUM);
size_t max_nonce_bytes = mte_base_drbgs_nonce_max_bytes(MTE_DRBG_ENUM);
// Get the minimum and maximum entropy byte length.
size_t minEntropyBytes = MteBase::getDrbgsEntropyMinBytes(MTE_DRBG_ENUM);
size_t maxEntropyBytes = MteBase::getDrbgsEntropyMaxBytes(MTE_DRBG_ENUM);
// Get min and max personalization string byte length.
size_t minPersonalBytes = MteBase::getDrbgsPersonalMinBytes(MTE_DRBG_ENUM);
size_t maxPersonalBytes = MteBase::getDrbgsPersonalMaxBytes(MTE_DRBG_ENUM);
// Get min and max nonce byte length.
size_t minNonceBytes = MteBase::getDrbgsNonceMinBytes(MTE_DRBG_ENUM);
size_t maxNonceBytes = MteBase::getDrbgsNonceMaxBytes(MTE_DRBG_ENUM);
// Create the Encoder with default options
MteEnc mteEncoder = new MteEnc();
// Get the minimum and maximum entropy byte length
int minEntropyBytes = mteEncoder.GetDrbgsEntropyMinBytes(mteEncoder.GetDrbg());
int maxEntropyBytes = mteEncoder.GetDrbgsEntropyMaxBytes(mteEncoder.GetDrbg());
// Get min and max personalization string byte length
int minPersonalBytes = mteEncoder.GetDrbgsPersonalMinBytes(mteEncoder.GetDrbg());
int maxPersonalBytes = mteEncoder.GetDrbgsPersonalMaxBytes(mteEncoder.GetDrbg());
// Get min and max nonce byte length
int minNonceBytes = mteEncoder.GetDrbgsNonceMinBytes(mteEncoder.GetDrbg());
int maxNonceBytes = mteEncoder.GetDrbgsNonceMaxBytes(mteEncoder.GetDrbg());
// Create the Encoder with default options
MteEnc encoder = new MteEnc();
// Get the min and max entropy byte length
int minEntropyBytes = MteBase.getDrbgsEntropyMinBytes(mteEncoder.getDrbg());
int maxEntropyBytes = MteBase.getDrbgsEntropyMaxBytes(mteEncoder.getDrbg());
// Get min and max personalization string byte length
int minPersonalBytes = MteBase.getDrbgsPersonalMinBytes(mteEncoder.getDrbg());
int maxPersonalBytes = MteBase.getDrbgsPersonalMaxBytes(mteEncoder.getDrbg());
// Get min and max nonce byte length
int minNonceBytes = MteBase.getDrbgsNonceMinBytes(mteEncoder.getDrbg());
int maxNonceBytes = MteBase.getDrbgsNonceMaxBytes(mteEncoder.getDrbg());
// In this example, an Mte Encoder is created with default options.
// In practice, use the previously initialized MTE, MKE, or FLEN (Fixed-Length) Encoder or Decoder.
let mteEncoder: = try MteEnc()
// Get the min and max entropy byte length
let minEntropyBytes: Int = MteBase.getDrbgsEntropyMinBytes(mteEncoder.getDrbg())
let maxEntropyBytes: UInt64 = MteBase.getDrbgsEntropyMaxBytes(mteEncoder.getDrbg())
// Get min and max personalization string byte length
let minPersonalBytes: Int = MteBase.getDrbgsPersonalMinBytes(mteEncoder.getDrbg())
let maxPersonalBytes: UInt64 = MteBase.getDrbgsPersonalMaxBytes(mteEncoder.getDrbg())
// Get min and max nonce byte length
let minNonceBytes: Int = MteBase.getDrbgsNonceMinBytes(mteEncoder.getDrbg())
let maxNonceBytes: Int = MteBase.getDrbgsNonceMaxBytes(mteEncoder.getDrbg())
# Create the Encoder with default options.
mte_encoder = MteEnc.fromdefault()
# Get the minimum and maximum entropy byte length.
min_entropy_bytes = MteBase.get_drbgs_entropy_min_bytes(mte_encoder.get_drbg())
max_entropy_bytes = MteBase.get_drbgs_entropy_max_bytes(mte_encoder.get_drbg())
# Get min and max personalization string byte length.
min_personal_bytes = MteBase.get_drbgs_personal_min_bytes(mte_encoder.get_drbg())
max_personal_bytes = MteBase.get_drbgs_personal_max_bytes(mte_encoder.get_drbg())
# Get min and max nonce byte length
min_nonce_bytes = MteBase.get_drbgs_nonce_min_bytes(mte_encoder.get_drbg())
max_nonce_bytes = MteBase.get_drbgs_nonce_max_bytes(mte_encoder.get_drbg())
// Create Encoder with default options
mteEncoder := mte.NewEncDef()
defer mteEncoder.Destroy()
// Get the min and max entropy byte length
minEntropyBytes := mte.GetDrbgsEntropyMinBytes(mteEncoder.GetDrbg())
maxEntropyBytes := mte.GetDrbgsEntropyMaxBytes(mteEncoder.GetDrbg())
// Get min and max personalization string byte length
minPersonalBytes := mte.GetDrbgsPersonalMinBytes(mteEncoder.GetDrbg())
maxPersonalBytes := mte.GetDrbgsPersonalMaxBytes(mteEncoder.GetDrbg())
// Get min and max nonce byte length
minNonceBytes := mte.GetDrbgsNonceMinBytes(mteEncoder.GetDrbg())
maxNonceBytes := mte.GetDrbgsNonceMaxBytes(mteEncoder.GetDrbg())
<?php
// Create Encoder with default options
$mteEnc = new MteEnc();
// Get the min and max entropy byte length
$minEntropyBytes = $mteEnc->getDrbgsEntropyMinBytes(constant($mteEnc->getDrbg()));
$maxEntropyBytes = $mteEnc->getDrbgsEntropyMaxBytes(constant($mteEnc->getDrbg()));
// Get the min and max personalization byte length
$minPersonalBytes = $mteEnc->getDrbgsPersonalMinBytes(constant($mteEnc->getDrbg()));
$maxPersonalBytes = $mteEnc->getDrbgsPersonalMaxBytes(constant($mteEnc->getDrbg()));
// Get the min and max nonce byte length
$minNonceBytes = $mteEnc->getDrbgsNonceMinBytes(constant($mteEnc->getDrbg()));
$maxNonceBytes = $mteEnc->getDrbgsNonceMaxBytes(constant($mteEnc->getDrbg()));
?>