Search Results enc_b64




Overview

APPS.FND_CRYPTO is a low-level cryptographic and encoding utility package in the Oracle E-Business Suite Applications technology stack. It provides the foundational encryption, decryption, hashing, message authentication, random value generation, and character encoding primitives used throughout the EBS middle tier. Because it is classified as an "OTHER" API rather than a published business API, it is intended primarily for internal consumption by other Oracle Applications packages and by advanced custom code that requires cryptographic services without relying on external toolkits.

The package body draws directly on Oracle's built-in UTL_RAW facility for raw byte manipulation. Its implementation defines several named constants that reveal its internal design: a PADRAW padding block used during symmetric encryption, IPAD and OPAD constant blocks (the classic 0x36 and 0x5C inner/outer padding used in HMAC-style hashing), and normalization constants such as NORMLZ, SHIFTL, ENCNML, and ENCNMM used for numeric conversions. It also defines base64 and URL-safe character maps (ENC_B64 and ENC_URL) together with the ENCODE and DECODE routines, which are the functions most likely associated with the user's "encode_orc" search — the package exposes encoding primitives that operate on these character maps.

The package is a dependency hub: it is referenced by approximately thirty other packages across the EBS codebase, which is consistent with a shared security utility that other modules call rather than reimplement.

Key Procedures and Functions

The documented public interface contains twelve procedures and functions:

  • ENCRYPT — Encrypts a supplied value, returning the protected (typically raw or encoded) representation.
  • DECRYPT — Performs the inverse of ENCRYPT, recovering the original plaintext. Decryption failure is signalled through the BadPadding exception, which is bound to Oracle error -12656.
  • ENCRYPTNUM — Numeric variant of ENCRYPT, applied to number values using the package's numeric normalization constants.
  • DECRYPTNUM — Reverses ENCRYPTNUM to recover the original numeric value.
  • HASH — Produces a one-way digest of the input, using the IPAD/OPAD construction.
  • MAC — Generates a message authentication code, providing integrity and authenticity verification rather than confidentiality alone.
  • RANDOMBYTES — Returns cryptographically usable random raw bytes.
  • RANDOMNUMBER — Returns a random numeric value across the full numeric range.
  • SMALLRANDOMNUMBER — Returns a random number constrained to a smaller range, useful where full-width randomness is unnecessary.
  • ENCODE — Encodes binary data into a text-safe representation using the package's base64 or URL-safe character maps.
  • DECODE — Reverses ENCODE, converting encoded text back to its original binary form.
  • RANDOMSTRING — Produces a random character string, typically used for salt, token, or nonce generation.

Tables Accessed

The ETRM metadata records only one referenced object: UTL_RAW, accessed through an APPS synonym. UTL_RAW is Oracle's supplied package for raw byte manipulation, and FND_CRYPTO relies on it for byte-level operations underlying encryption, hashing, and random byte generation. No application tables (such as FND_% configuration or user tables) are documented as being read or written, confirming that this package is stateless with respect to persistent data and operates purely on values passed to it.

Usage Notes

Because FND_CRYPTO is an internal utility, it is ordinarily invoked indirectly. Other EBS packages that must store or transmit sensitive values — credentials, connection strings, session tokens, or personally identifiable data — call FND_CRYPTO.ENCRYPT, DECRYPT, HASH, or MAC rather than implementing cryptography themselves. Concurrent programs and Oracle Forms-based transactions that persist protected values route through these calling packages, and the forms layer typically never references FND_CRYPTO directly.

Custom code should treat FND_CRYPTO as an unsupported extension point: signatures may change between point releases (for example, between 12.1.1 and 12.2.2), and the package is not published as a formal API. Where ENCODE or DECODE is required, the base64 and URL-safe character maps defined in the package body define the accepted alphabets, so encoded strings must not be altered or re-padded before being passed back to DECODE. Numeric values processed via ENCRYPTNUM and DECRYPTNUM should be passed and consumed as NUMBER types to preserve fidelity.