Have your own printed invitations

For your invitations we offer a number of options:

Paper – Many people use a high quality cardstock paper that is fine for most invitations. We offer a number of cardstock options. Some choose to not use cardstock, and save money and weight. If you’re looking for something else, you may also want to consider the high quality photo paper options available from us in our gift wrap and gift wrap collection.

Many people use a high quality cardstock paper that is fine for most invitations. We offer a number of cardstock options. Some choose to not use cardstock, and save money and weight. If you’re looking for something else, you may also want to consider the high quality photo paper options available from us in our gift wrap and gift wrap collection. PDF The “official” form for this card is a PDF. All other file types require a program, such as Adobe Photoshop, to open and print on. A note about the PDF file type: you can open this file with any program that can open a PDF file, such as Adobe Photoshop, Word, or even Google Drive. The file is free to download, even if you don’t buy anything. In the past, the cost to print our printed invitation designs was much more, due to the high cost to print a card (including production costs, but especially for envelopes). Please don’t hesitate to ask us if you need any more information on how to send the card to your loved ones. Thanks for joining us in being able to share this magical love letter!

Love Letter: A Valentine’s Day Card for Friends & Family A beautiful Valentine’s Day gift that is both personal and thoughtful. Gift Print PDF Love Letter Print A gorgeous Valentine’s Day gift that is both personal and thoughtful, all you need to do is to make sure to use the best custom label printing services. You can get more information about your printing options over here.

Persisting sensitive information with PowerShell

It often happens that I need to persist a password or another sensitive information strings in a file or database. When it happens I can never recall what was exactly the command I used to do so in the past. That’s why I decided to encapsulate the two operation of encrypting and decrypting a string in a cmdlet so that the next time I can just check my blog post.

A small preface about the operation of encryption. It is based on the ConvertTo-SecureString cmdlet which on its own uses Advanced Encryption Standard (AES) encryption algorithm. Supported key lengths by the AES encryption algorithm in this case are 128, 192, or 256 bits and they do depend on the specified key length.

function Protect-String()
{
    [CmdletBinding()]
    param
    (
        [string][parameter(Mandatory = $true)]$String,
        [string][parameter(Mandatory = $true)]$Key
    )
    BEGIN { }
    PROCESS
    {      
        if (([system.Text.Encoding]::Unicode).GetByteCount($Key) * 8 -notin 128,192,256)
        {
            throw "Given encription key has an invalid lenght. The specified key must have a length of 128, 192, or 256 bits."
        }

        $secureKey = ConvertTo-SecureString -String $Key -AsPlainText -Force
        
        return ConvertTo-SecureString $String -AsPlainText -Force | ConvertFrom-SecureString -SecureKey $secureKey
    }
    END { }
}

As you can see, there are two required parameters, string that you are trying to encrypt and the key to use to encrypt it. As mentioned above, specified key must have a length of 128, 192, or 256 bits. This translate in a string with length respectively equal to 8, 12 or 16 chars. The calculation is simple, strings inside PowerShell are represented as 16-bit Unicode, instances of .NET’s System.String class, thus 16 bits per character. Knowing this, the maths is easy.
For record, if we haven’t specified any key, the Windows Data Protection API (DPAPI) would be used to encrypt the standard string representation and we wouldn’t be capable of decrypting our string on a different computer.
After we invoke our cmdlet, we will get back the encrypted string. We can then persist that information safely in, at example, our configuration file or a database field.

Once we need to read our value back we can use the following cmdlet:

function Unprotect-String()
{
    [CmdletBinding()]
    param
    (
        [string][parameter(Mandatory = $true)]$String,
        [string][parameter(Mandatory = $true)]$Key
    )
    BEGIN { }
    PROCESS
    {
        if (([system.Text.Encoding]::Unicode).GetByteCount($Key) * 8 -notin 128,192,256)
        {
            throw "Given encription key has an invalid lenght. The specified key must have a length of 128, 192, or 256 bits."
        }

        $secureKey = ConvertTo-SecureString -String $Key -AsPlainText -Force
        $secureString = ConvertTo-SecureString $String -SecureKey $secureKey

        $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "dummy", $secureString

        return $credential.GetNetworkCredential().Password
    }
    END { }
}

Passing in the encrypted string and the key that should be used to decrypt the information, this cmdlet will return the decrypted string.

Following an example:

$password = "My strong super password"
$key = '1234567890123456'

$encryptedString = Protect-String $password $key

Unprotect-String $encryptedString $key

You can expect to see outputted console the “My strong super password”.

That’s all folks. Keep your sensitive information safe!