Click here to Skip to main content
15,889,808 members
Articles / General Programming

Calculating hash values in Windows Metro Style applications using C#

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
4 Mar 2013CPOL1 min read 24K   465   8  
Calculating hash values in Windows Metro style applications using C# and .NET 4.5.
<Page
    x:Class="HashSampleMetro.MainPage"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:HashSampleMetro"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <TextBlock HorizontalAlignment="Left" Margin="104,282,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Text="Text to Create the Hash Value " FontSize="24"/>
        <TextBox x:Name="txtValue" HorizontalAlignment="Left" Margin="446,282,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="606"/>
        <Button x:ConnectionId='1' x:Name="btnCalculate" Content="Calculate Hash" HorizontalAlignment="Left" Margin="1076,274,0,0" VerticalAlignment="Top"                        Width="235" FontSize="24" FontWeight="Bold"/>
        <TextBlock x:Name="lblResultHeder" HorizontalAlignment="Left" Margin="104,404,0,0" TextWrapping="Wrap" VerticalAlignment="Top">
        	<Run FontSize="24" Text="Result"/>
        	<Run Text=" "/>
        </TextBlock>
        <TextBlock x:Name="lblResult" HorizontalAlignment="Left" Margin="208,404,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="29" Width="1103" FontSize="24" FontWeight="Bold"/>
        <TextBlock HorizontalAlignment="Left" Margin="104,348,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="24">
        	<Run FontSize="24" Text="Hashing Algorithm used"/>
        </TextBlock>
        <TextBlock x:Name="lblAlg" HorizontalAlignment="Left" Margin="446,348,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="24"/>
    </Grid>
</Page>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Sri Lanka Sri Lanka
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions